<div class="col-md-3 col-lg-3"></div>
<div class="col-md-6 col-lg-6">
  <form #loginForm="ngForm">
    <div class="form-group">
      <label for="telephone">Telephone</label>
      <input type="text" class="form-control" #tel="ngModel" pattern="^1[34578]\d{9}$" [(ngModel)]="_telephone" id="telephone" name="telephone" placeholder="Telephone" required>
    </div>
    <div *ngIf="tel.invalid && (tel.dirty || tel.touched)"
         class="alert alert-danger">
      <div *ngIf="tel.errors.required">
        号码不能为空
      </div>
      <div *ngIf="tel.errors.pattern">
        号码格式不正确
      </div>
    </div>
    <div class="form-group">
      <label for="password">Password</label>
      <input type="password" class="form-control" #pass="ngModel" minlength="6"  [(ngModel)]="_password" id="password" name="password" placeholder="Password" required>
    </div>

    <div *ngIf="pass.invalid && (pass.dirty || pass.touched)"
         class="alert alert-danger">
      <div *ngIf="pass.errors.required">
        密码不能为空
      </div>
      <div *ngIf="pass.errors.minlength">
        密码大于六位
      </div>
    </div>
   <!-- <div class="form-group">
      <label for="exampleInputFile">File input</label>
      <input type="file" id="exampleInputFile">
      <p class="help-block">Example block-level help text here.</p>
    </div>
    <div class="checkbox">
      <label>
        <input type="checkbox"> Check me out
      </label>
    </div>-->
    <button type="button" (click)="toLogin(loginForm)" [disabled]="loginForm.form.invalid" class="btn btn-default">Login..</button>
    <button type="button" (click)="getAll()"  class="btn btn-default">getAllUsers..</button>

    <div *ngIf="login_res"
         class="alert alert-danger">
        {{login_res}}
    </div>

  </form>
</div>
<div class="col-md-3 col-lg-3"></div>
